Optimal. Leaf size=96 \[ -\frac{a b^2 \log (x)}{\left (a^2+1\right )^2}+\frac{a b^2 \log \left ((a+b x)^2+1\right )}{2 \left (a^2+1\right )^2}-\frac{\left (1-a^2\right ) b^2 \tan ^{-1}(a+b x)}{2 \left (a^2+1\right )^2}-\frac{b}{2 \left (a^2+1\right ) x}-\frac{\tan ^{-1}(a+b x)}{2 x^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0833072, antiderivative size = 96, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.7, Rules used = {5045, 371, 710, 801, 635, 203, 260} \[ -\frac{a b^2 \log (x)}{\left (a^2+1\right )^2}+\frac{a b^2 \log \left ((a+b x)^2+1\right )}{2 \left (a^2+1\right )^2}-\frac{\left (1-a^2\right ) b^2 \tan ^{-1}(a+b x)}{2 \left (a^2+1\right )^2}-\frac{b}{2 \left (a^2+1\right ) x}-\frac{\tan ^{-1}(a+b x)}{2 x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5045
Rule 371
Rule 710
Rule 801
Rule 635
Rule 203
Rule 260
Rubi steps
\begin{align*} \int \frac{\tan ^{-1}(a+b x)}{x^3} \, dx &=-\frac{\tan ^{-1}(a+b x)}{2 x^2}+\frac{1}{2} b \int \frac{1}{x^2 \left (1+(a+b x)^2\right )} \, dx\\ &=-\frac{\tan ^{-1}(a+b x)}{2 x^2}+\frac{1}{2} b^2 \operatorname{Subst}\left (\int \frac{1}{(-a+x)^2 \left (1+x^2\right )} \, dx,x,a+b x\right )\\ &=-\frac{b}{2 \left (1+a^2\right ) x}-\frac{\tan ^{-1}(a+b x)}{2 x^2}+\frac{b^2 \operatorname{Subst}\left (\int \frac{-a-x}{(-a+x) \left (1+x^2\right )} \, dx,x,a+b x\right )}{2 \left (1+a^2\right )}\\ &=-\frac{b}{2 \left (1+a^2\right ) x}-\frac{\tan ^{-1}(a+b x)}{2 x^2}+\frac{b^2 \operatorname{Subst}\left (\int \left (\frac{2 a}{\left (1+a^2\right ) (a-x)}+\frac{-1+a^2+2 a x}{\left (1+a^2\right ) \left (1+x^2\right )}\right ) \, dx,x,a+b x\right )}{2 \left (1+a^2\right )}\\ &=-\frac{b}{2 \left (1+a^2\right ) x}-\frac{\tan ^{-1}(a+b x)}{2 x^2}-\frac{a b^2 \log (x)}{\left (1+a^2\right )^2}+\frac{b^2 \operatorname{Subst}\left (\int \frac{-1+a^2+2 a x}{1+x^2} \, dx,x,a+b x\right )}{2 \left (1+a^2\right )^2}\\ &=-\frac{b}{2 \left (1+a^2\right ) x}-\frac{\tan ^{-1}(a+b x)}{2 x^2}-\frac{a b^2 \log (x)}{\left (1+a^2\right )^2}+\frac{\left (a b^2\right ) \operatorname{Subst}\left (\int \frac{x}{1+x^2} \, dx,x,a+b x\right )}{\left (1+a^2\right )^2}-\frac{\left (\left (1-a^2\right ) b^2\right ) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,a+b x\right )}{2 \left (1+a^2\right )^2}\\ &=-\frac{b}{2 \left (1+a^2\right ) x}-\frac{\left (1-a^2\right ) b^2 \tan ^{-1}(a+b x)}{2 \left (1+a^2\right )^2}-\frac{\tan ^{-1}(a+b x)}{2 x^2}-\frac{a b^2 \log (x)}{\left (1+a^2\right )^2}+\frac{a b^2 \log \left (1+(a+b x)^2\right )}{2 \left (1+a^2\right )^2}\\ \end{align*}
Mathematica [C] time = 0.0958245, size = 92, normalized size = 0.96 \[ \frac{-2 \tan ^{-1}(a+b x)+\frac{b x \left (-i (a+i)^2 b x \log (-a-b x+i)-4 a b x \log (x)+(a-i) ((1+i a) b x \log (a+b x+i)-2 (a+i))\right )}{\left (a^2+1\right )^2}}{4 x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.043, size = 105, normalized size = 1.1 \begin{align*} -{\frac{\arctan \left ( bx+a \right ) }{2\,{x}^{2}}}+{\frac{{b}^{2}\arctan \left ( bx+a \right ){a}^{2}}{2\, \left ({a}^{2}+1 \right ) ^{2}}}+{\frac{a{b}^{2}\ln \left ( 1+ \left ( bx+a \right ) ^{2} \right ) }{2\, \left ({a}^{2}+1 \right ) ^{2}}}-{\frac{{b}^{2}\arctan \left ( bx+a \right ) }{2\, \left ({a}^{2}+1 \right ) ^{2}}}-{\frac{b}{ \left ( 2\,{a}^{2}+2 \right ) x}}-{\frac{a{b}^{2}\ln \left ( bx \right ) }{ \left ({a}^{2}+1 \right ) ^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.52569, size = 151, normalized size = 1.57 \begin{align*} \frac{1}{2} \,{\left (\frac{{\left (a^{2} - 1\right )} b \arctan \left (\frac{b^{2} x + a b}{b}\right )}{a^{4} + 2 \, a^{2} + 1} + \frac{a b \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{a^{4} + 2 \, a^{2} + 1} - \frac{2 \, a b \log \left (x\right )}{a^{4} + 2 \, a^{2} + 1} - \frac{1}{{\left (a^{2} + 1\right )} x}\right )} b - \frac{\arctan \left (b x + a\right )}{2 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.89237, size = 225, normalized size = 2.34 \begin{align*} \frac{a b^{2} x^{2} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right ) - 2 \, a b^{2} x^{2} \log \left (x\right ) -{\left (a^{2} + 1\right )} b x +{\left ({\left (a^{2} - 1\right )} b^{2} x^{2} - a^{4} - 2 \, a^{2} - 1\right )} \arctan \left (b x + a\right )}{2 \,{\left (a^{4} + 2 \, a^{2} + 1\right )} x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 16.5722, size = 644, normalized size = 6.71 \begin{align*} \begin{cases} - \frac{2 b^{3} x^{3} \operatorname{atan}{\left (b x - i \right )}}{16 b x^{3} - 32 i x^{2}} + \frac{i b^{3} x^{3}}{16 b x^{3} - 32 i x^{2}} + \frac{4 i b^{2} x^{2} \operatorname{atan}{\left (b x - i \right )}}{16 b x^{3} - 32 i x^{2}} - \frac{8 b x \operatorname{atan}{\left (b x - i \right )}}{16 b x^{3} - 32 i x^{2}} + \frac{2 i b x}{16 b x^{3} - 32 i x^{2}} + \frac{16 i \operatorname{atan}{\left (b x - i \right )}}{16 b x^{3} - 32 i x^{2}} - \frac{4}{16 b x^{3} - 32 i x^{2}} & \text{for}\: a = - i \\- \frac{2 b^{3} x^{3} \operatorname{atan}{\left (b x + i \right )}}{16 b x^{3} + 32 i x^{2}} - \frac{i b^{3} x^{3}}{16 b x^{3} + 32 i x^{2}} - \frac{4 i b^{2} x^{2} \operatorname{atan}{\left (b x + i \right )}}{16 b x^{3} + 32 i x^{2}} - \frac{8 b x \operatorname{atan}{\left (b x + i \right )}}{16 b x^{3} + 32 i x^{2}} - \frac{2 i b x}{16 b x^{3} + 32 i x^{2}} - \frac{16 i \operatorname{atan}{\left (b x + i \right )}}{16 b x^{3} + 32 i x^{2}} - \frac{4}{16 b x^{3} + 32 i x^{2}} & \text{for}\: a = i \\- \frac{a^{4} \operatorname{atan}{\left (a + b x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} + \frac{a^{2} b^{2} x^{2} \operatorname{atan}{\left (a + b x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac{a^{2} b x}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac{2 a^{2} \operatorname{atan}{\left (a + b x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac{2 a b^{2} x^{2} \log{\left (x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} + \frac{a b^{2} x^{2} \log{\left (a^{2} + 2 a b x + b^{2} x^{2} + 1 \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac{b^{2} x^{2} \operatorname{atan}{\left (a + b x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac{b x}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} - \frac{\operatorname{atan}{\left (a + b x \right )}}{2 a^{4} x^{2} + 4 a^{2} x^{2} + 2 x^{2}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.08494, size = 155, normalized size = 1.61 \begin{align*} \frac{1}{2} \,{\left (\frac{a b \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{a^{4} + 2 \, a^{2} + 1} - \frac{2 \, a b \log \left ({\left | x \right |}\right )}{a^{4} + 2 \, a^{2} + 1} + \frac{{\left (a^{2} b^{2} - b^{2}\right )} \arctan \left (b x + a\right )}{{\left (a^{4} + 2 \, a^{2} + 1\right )} b} - \frac{1}{{\left (a^{2} + 1\right )} x}\right )} b - \frac{\arctan \left (b x + a\right )}{2 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]